using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class error_msgMap : EntityTypeConfiguration<error_msg>
    {
        public error_msgMap()
        {
            // Primary Key
            this.HasKey(t => t.error_msg_id);

            // Properties
            this.Property(t => t.model_name)
                .HasMaxLength(300);

            this.Property(t => t.user_id)
                .HasMaxLength(300);

            this.Property(t => t.error_msg_desc)
                .HasMaxLength(3900);

            this.Property(t => t.error_msg_comment)
                .HasMaxLength(3000);

            // Table & Column Mappings
            this.ToTable("error_msg");
            this.Property(t => t.error_msg_id).HasColumnName("error_msg_id");
            this.Property(t => t.error_time).HasColumnName("error_time");
            this.Property(t => t.model_name).HasColumnName("model_name");
            this.Property(t => t.error_code).HasColumnName("error_code");
            this.Property(t => t.user_id).HasColumnName("user_id");
            this.Property(t => t.error_msg_desc).HasColumnName("error_msg_desc");
            this.Property(t => t.error_msg_comment).HasColumnName("error_msg_comment");
        }
    }
}
